package com.lq.service.impl;

import com.lq.mapper.SettingMapper;
import com.lq.pojo.OverallSetting;
import com.lq.pojo.PersonalSetting;
import com.lq.service.SettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SettingServiceImpl implements SettingService {

    @Autowired
    private SettingMapper settingMapper;

    @Override
    public boolean savePersonalSetting(PersonalSetting personalSetting) {
        return settingMapper.savePersonalSetting(personalSetting);
    }

    @Override
    public boolean saveOverallSetting(OverallSetting overallSetting) {
        return settingMapper.saveOverallSetting(overallSetting);
    }

    @Override
    public PersonalSetting getPersonalSettingByUserId(Integer userId) {
        return settingMapper.getPersonalSettingByUserId(userId);
    }

    @Override
    public OverallSetting getOverallSettingByUserId(Integer userId) {
        return settingMapper.getOverallSettingByUserId(userId);
    }
}
